
Project: Async_ping
Device: CY8C24794
Created: PSoC Designer version 4.2 b1013 with Service Pack 2
Copyright: Cypress Semiconductor, all rights reserved, 2005

Purpose

This project demonstrates a USB loop back using BULK endpoints.
A single USBFS user module is placed in the device editor. The
USB wizard was used to configure the end points and enumeration
characteristics.  'C' is used so a valid license is needed to build.

Files

Three files required modification

main.c - contains the initialization and loop back logic.
isr_hndlr.c - Interrupt service routines for OUT end point 2
              and IN end point 1.
.\lib\usbfs_1int.asm - jumps to 'C' ISRs within custom code markers

Architecture

The USB user module generated code to handle enumeration and end point
interaction.

The initialization (main.c) starts the USB user module, enables 
interrupts, and clears the end point data area.

The interrupt process (isr_hndlr.c) sets a flag when the OUT end point 
gets data. The IN end point re-enables the OUT end point.

The loop back logic (main.c) reads a flag, set in the 
interrupt, to determine when it should fill the IN end point buffer with
the contents of the OUT end point data.